<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	$item=$this->plugin_setting('saleset');
	$item['aciton']='jy_weishop/sale.qingdan/';
	$item['url']=custom_url($item['aciton'],true);
	$return['item']=$item;
	$htmls=array(
		'type'=>'edit',
		'post'=>'set',
		'desc'=>'清单设置',
		'edit'=>array(
			array('type'=>'switch','name'=>'qingdan_open','title'=>'开启清单','help'=>'开启后，<red>商品详情页，左下角会显示加入清单按钮(同时会隐藏购物车，加入购物车按钮)</red>！'),
			array('type'=>'copy','name'=>'url','title'=>'清单长地址'),
			array('type'=>'copy','name'=>'aciton','title'=>'清单短地址'),
			
		)
	);
	$return['htmls']=$htmls;	
	exi($return);
}
if($_RQ['op']=='set'){
	$post=get_postdata();
	$post['qingdan_open']=intval($post['qingdan_open']);
	$this->plugin_setting('saleset',$post);
	exi('设置成功');
}